---
layout: blog
---

{% for post in paginator.posts %}
    <section class="post">
        <header class="post-header">
            <img class="post-avatar" height="48" width="48"
                 src="{{ post.avatarimg }}">

            <h2 class="post-title"><a href="{{ post.url }}">{{ post.title }}</a></h2>
            
            <p class="post-meta">By {{ post.date | date: "%m" }}月{{ post.date | date: "%d" }}日  {{ post.date | date: "%Y" }}
                <!-- weiyi.theme.modify todo 修复tag枚举错误 -->
                <a class="post-categorybut " href="/categories/#{{ post.categories  }}">{{ post.categories  }}</a>
                <span class="post-category">{% for tag in post.tags %}<a href="/tags/#{{ tag }}" title="Pages tagged {{ tag }}" class="post-category">{{ tag }}</a>{% unless forloop.last %}{% endunless %}{% endfor %}</span>                    
            </p>
        </header>

        <div class="post-description">
            {{ post.content | split:'<!-- more -->'| first }}
            <a href="{{ post.url }}" class="post-categorybut">阅读全文</a>
        </div>
    </section>
{% endfor %}


<!-- weiyi.theme.modify todo 修复翻页错误
href="/page/{{paginator.previous_page}}" 修改为 href="{{ site.baseurl }}page{{paginator.previous_page}}"
-->
<div class="pure-g pagination">
    {% if paginator.previous_page %}
        {% if paginator.page == 2 %}
            <a class="pure-u-1-2 pagination-item" href="{{ site.baseurl }}"><p>Newer&nbsp;<i class="fa fa-mail-reply"></i></p></a>
        {% else %}
            <a class=" pure-u-1-2 pagination-item" href="{{ site.baseurl }}page{{paginator.previous_page}}"><p>Newer&nbsp;<i class="fa fa-mail-reply"></i></p></a>
        {% endif %}
    {% else %}
        <span class=" pure-u-1-2 pagination-item"><p>Newer&nbsp;<i class="fa fa-chain-broken"></i></p></span>
    {% endif %}

    {% if paginator.next_page %}
        <a class=" pure-u-1-2 pagination-item" href="{{ site.baseurl }}page{{paginator.next_page}}"><p>Older&nbsp;<i class="fa fa-mail-forward"></i></p></a>
    {% else %}
        <span class=" pure-u-1-2 pagination-item"><p>Older&nbsp;<i class="fa fa-chain-broken"></i></p></span>
    {% endif %}
</div>